//
//  LevelSetCell.m
//  Lightthings
//
//  Created by 王岩 on 2025/1/16.
//

#import "LevelSetCell.h"
#import "LevelSetModel.h"
@implementation LevelSetCell

- (void)setModel:(LevelSetModel *)model {
    [super setModel:model];
    self.lowerView.zh_action = model.lowerAction;
    self.middleView.zh_action = model.middleAction;
    self.heightView.zh_action = model.heighAction;
    self.relaxlowerView.zh_action = model.relaxlowerAction;
    self.relaxmiddleView.zh_action = model.relaxmiddleAction;
    self.relaxheightView.zh_action = model.relaxheighAction;
    
    if (model.relaxLevel == 3) {
        self.relaxlowerView.backgroundColor = KLColor(@"#DDDDDD");
        self.relaxmiddleView.backgroundColor = KLColor(@"#DDDDDD");
        self.relaxheightView.backgroundColor = KLColor(@"#CCEBF8");
    }else if (model.relaxLevel == 2) {
        self.relaxlowerView.backgroundColor = KLColor(@"#DDDDDD");
        self.relaxmiddleView.backgroundColor = KLColor(@"#CCEBF8");
        self.relaxheightView.backgroundColor = KLColor(@"#DDDDDD");
    }else if (model.relaxLevel == 1) {
        self.relaxlowerView.backgroundColor = KLColor(@"#CCEBF8");
        self.relaxmiddleView.backgroundColor = KLColor(@"#DDDDDD");
        self.relaxheightView.backgroundColor = KLColor(@"#DDDDDD");
    }else {
        self.relaxlowerView.backgroundColor = KLColor(@"#DDDDDD");
        self.relaxmiddleView.backgroundColor = KLColor(@"#DDDDDD");
        self.relaxheightView.backgroundColor = KLColor(@"#DDDDDD");
    }
    
      if (model.level == 3) {
        self.lowerView.backgroundColor = KLColor(@"#DDDDDD");
        self.middleView.backgroundColor = KLColor(@"#DDDDDD");
        self.heightView.backgroundColor = KLColor(@"#CCEBF8");
    }else if (model.level == 2) {
        self.lowerView.backgroundColor = KLColor(@"#DDDDDD");
        self.middleView.backgroundColor = KLColor(@"#CCEBF8");
        self.heightView.backgroundColor = KLColor(@"#DDDDDD");
    }else if (model.level == 1) {
        self.lowerView.backgroundColor = KLColor(@"#CCEBF8");
        self.middleView.backgroundColor = KLColor(@"#DDDDDD");
        self.heightView.backgroundColor = KLColor(@"#DDDDDD");
    }else {
        self.lowerView.backgroundColor = KLColor(@"#DDDDDD");
        self.middleView.backgroundColor = KLColor(@"#DDDDDD");
        self.heightView.backgroundColor = KLColor(@"#DDDDDD");
    }
    
}


- (void)awakeFromNib {
    [super awakeFromNib];
    
    self.layer.cornerRadius = 8;
    self.layer.masksToBounds =  YES;
    
    // Initialization code
}

@end
